/*
 * FastTransmissionSchedule.h
 *
 *  Created on: 2015年7月17日
 *      Author: Administrator
 */

#ifndef BCCH_TRANSSCHEDULE_FASTTRANSMISSIONSCHEDULE_H_
#define BCCH_TRANSSCHEDULE_FASTTRANSMISSIONSCHEDULE_H_
#include "../class1/ClassOne.h"
#include "../class4/Class4A.h"
#include "../class2/Class2Abis.h"
#include "../class3/Class3Bbis.h"
#include "../class2/Class2Bbis.h"
#include "../class3/Class3D.h"
#include "../class3/Class3Ebis.h"
#include "../class4/Class4A.h"
#include "../class3/Class3F.h"
#include "../class3/Class3Gbis.h"
#include "../class3/Class3H.h"
#include "../class3/Class3I.h"
#include "../class3/Class3Jbis.h"
#include "../class3/Class3A.h"
#include "../class3/Class3C.h"

//其中<Block Header>::=
//<Protocol version: "0000">
//<Block Type: 1bit> − Set to "1". 标志着此块含Class 1信息
//<Randomization period: 2bits> − 随机化延迟帧周期<m>，表示CHANNEL REQUEST 消息相当于系统信息延迟的帧数.
//00: <m> = 7
//01: <m> = 15
//10: <m> = 23
//11: <m> = 31
//<Spare: 1bit>;
struct fastBlockHeader{
	unsigned char protocolVersion:4;
	unsigned char blockType:1;
	unsigned char RandomPeriod:2;
	unsigned char spare:1;
};

struct fast_block1{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class4A class4A;//120bit 本来此处为4n(A,B,C,D,E,F) 用4代替
};
struct fast_block2{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class2Abis class2Abis;//120bit
};
struct fast_block3{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class3A class3A;//120bit
};
struct fast_block4{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class3Bbis class3Bbis;//120bit
};
struct fast_block5{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class3C class3C;//120bit
};
struct fast_block6{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class2Bbis class2Bbis;//120bit
};
struct fast_block7{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class3D class3D;//120bit
};
struct fast_block8{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class3Ebis class3Ebis;//120bit
};
struct fast_block9{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class4A class4A;//120bit 本来此处为4n(A,B,C,D,E,F) 用4代替

};
struct fast_block10{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class2Abis class2Abis;//120bit
};
struct fast_block11{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class3F class3F;//120bit
};
struct fast_block12{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class3Gbis class3Gbis;//120bit
};
struct fast_block13{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class3H class3H;//120bit
};
struct fast_block14{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class2Bbis class2Bbis;//120bit
};
struct fast_block15{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class3I class3I;//120bit
};
struct fast_block16{
	bool valid ;
	//	short type;
	fastBlockHeader blockHeader;//8bit
	ClassOne class1A;//64bit
	Class3Jbis class3Jbis;//120bit
};



class FastTransmissionSchedule {
public:
	FastTransmissionSchedule();
	virtual ~FastTransmissionSchedule();
	void FastTransSchInit();
	void fetchBlockInfo(char *pbuff);
	void getCls2Abis(char *pbuff);
	void getCls2Bbis(char *pbuff);
	fast_block1 mfast_block1;
	fast_block2 mfast_block2;
	fast_block3 mfast_block3;
	fast_block4 mfast_block4;
	fast_block5 mfast_block5;
	fast_block6 mfast_block6;
	fast_block7 mfast_block7;
	fast_block8 mfast_block8;
	fast_block9 mfast_block9;
	fast_block10 mfast_block10;
	fast_block11 mfast_block11;
	fast_block12 mfast_block12;
	fast_block13 mfast_block13;
	fast_block14 mfast_block14;
	fast_block15 mfast_block15;
	fast_block16 mfast_block16;

};

#endif /* BCCH_TRANSSCHEDULE_FASTTRANSMISSIONSCHEDULE_H_ */
